xen/pvh: place the trampoline starting at MFN 1
authorRoger Pau Monne <roger.pau@citrix.com>
Wed, 17 Jan 2018 08:34:26 +0000 (08:34 +0000)
committerWei Liu <wei.liu2@citrix.com>
Thu, 18 Jan 2018 11:17:52 +0000 (11:17 +0000)
commita232346b1fe1aee0805cdf1f1c3342fc6ad7c353
treecd7c85dbb841180f99f86799f184c1aecd7653b6
parentaeb318351a77c8556025fced110ce387e4dfb93e
xen/pvh: place the trampoline starting at MFN 1

Since PVH guest jump straight into trampoline_setup trampoline_phys is
not initialized, thus the trampoline is relocated to address 0.

This works, but has the undesirable effect of having VA 0 mapped to
MFN 0, which means NULL pointed dereferences no longer trigger a page
fault.

In order to solve this, place the trampoline starting at MFN 1 and
reserve the memory used by it.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/boot/head.S
xen/arch/x86/mm.c